/**
 * IdSorterer.java
 * ************************** 
 * @date Apr 27, 2011
 * @author Michele Tamburini
 * 
 * **************************
 */
package gossipServices.basic.nodeDescriptors.comparators;

import gossipServices.basic.nodeDescriptors.NodeDescriptor;

/**
 * Description:
 * It compares the two NodeDescriptor in input according to the
 * partial ordering of their ID. 
 *
 */
public class IdSorterer implements NodeDescriptorComparator {

	/**
	 * 
	 */
	public IdSorterer() { }

	@Override
	public int compare(NodeDescriptor o1, NodeDescriptor o2) {
		return o1.getNodeID().compareTo(o2.getNodeID());
	}

}
